#pragma once

#include "lg_conf.h"


enum {
	LG_TFLOAT,
	LG_TINT,
	LG_TUNSIGNED,
	LG_TVECTOR,
	LG_TMATRIX,
	LG_TTEXTURE,
	LG_TCANVAS,
};

typedef enum {
	LG_DRAW_POINTS,
	LG_DRAW_LINES,
	LG_DRAW_LINE_STRIP,
	LG_DRAW_LINE_LOOP,
	LG_DRAW_TRIANGLES,
	LG_DRAW_TRIANGLE_STRIP,
	LG_DRAW_TRIANGLE_FAN,
}LGDrawType;


typedef enum {
	LG_DEPTH_TEST_ALWAYS,
	LG_DEPTH_TEST_NEVER,
	LG_DEPTH_TEST_LESS,
	LG_DEPTH_TEST_GREATER,
	LG_DEPTH_TEST_EQUAL,
	LG_DEPTH_TEST_NEQUAL,
	LG_DEPTH_TEST_LEQUAL,
	LG_DEPTH_TEST_GEQUAL,
}LGDepthTest;

typedef enum {
	LGTEX_RGBA,
	LGTEX_RGB,
}LGTexFormat;

typedef enum {
	LGTEX_FILTER_LINEAR,
	LGTEX_FILTER_NEAREST,
}LGTexFilter;

typedef enum {
	LGTEX_WRAP_REPEAT,
	LGTEX_WRAP_EDGE,
	LGTEX_WRAP_BORDER,
}LGTexWrap;


#define LG_VERTEX_OFFSET(C, B) (int)(uint64_t)(&((C *)(void*)0)->B)
typedef enum {
	LG_VERTEX_POSITION,
	LG_VERTEX_COLOR,
	LG_VERTEX_UV,
	LG_VERTEX_NORMAL,
	LG_VERTEX_VECTOR1,
	LG_VERTEX_VECTOR2,
	LG_VERTEX_VECTOR3,
	LG_VERTEX_VECTOR4,
}LGVertexLayout;
typedef struct {
	LGVector position;
	LGVector color;
	LGVector uv;
	LGVector normal;
}LGStdPoint;

typedef enum {
	LGSTD_BASE_COLOR_SHADER,
	LGSTD_BASE_TEXTURE_SHADER,
}LGStdShader;

typedef enum {
	LGSHADER_VERTEX,
	LGSHADER_FRAGMENT,
}LGShaderType;

typedef enum {
	LG_WINDOW_EVT_RESIZE,
	LG_WINDOW_EVT_CLOSE,
	LG_WINDOW_EVT_MOUSE_MOVE,
	LG_WINDOW_EVT_MOUSE_CLICK,
}LGWindowEvt;
